package com.ldzy.service.serviceIpmI;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ldzy.dao.RecordMapper;
import com.ldzy.dao.UserMapper;
import com.ldzy.pojo.Record;
import com.ldzy.pojo.User;
import com.ldzy.service.IRecordService;
import com.ldzy.service.IUserService;
import com.ldzy.utilts.RespUtil;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class IRecordServiceIpmI extends ServiceImpl<RecordMapper, Record> implements IRecordService {
    @Resource RecordMapper recordMapper;

    @Override
    public RespUtil findByUserId(Record record) {
        if (recordMapper.findByUserId(record).size()!=0)
            return  RespUtil.success(recordMapper.findByUserId(record));
        return RespUtil.error();
    }
}
